package util
{
	import flash.utils.ByteArray;
	
	import data.Exception;

	public class ExceptionUtil
	{
		public static function exception(bytes:ByteArray):Exception
		{
			var exception:Exception = new Exception();
			exception.from 		= BytesUtil.readU30(bytes);
			exception.to 		= BytesUtil.readU30(bytes);
			exception.target 	= BytesUtil.readU30(bytes);
			exception.exc_type 	= BytesUtil.readU30(bytes);
			exception.var_name 	= BytesUtil.readU30(bytes);
			return exception;
		}
	}
}